/**
 * Copyright &copy; 2012-2015 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.soccer.cms.modules.sys.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;

import com.soccer.cms.common.persistence.Page;
import com.soccer.cms.common.service.CrudService;
import com.soccer.cms.modules.sys.entity.Dictinfo;
import com.soccer.cms.modules.sys.dao.DictinfoDao;

/**
 * 字典信息Service
 * @author zouqh
 * @version 2015-05-25
 */
@Service
@Transactional(readOnly = true)
public class DictinfoService extends CrudService<DictinfoDao, Dictinfo> {

	public Dictinfo get(String id) {
		return super.get(id);
	}
	
	public List<Dictinfo> findList(Dictinfo dictinfo) {
		return super.findList(dictinfo);
	}
	
	public Page<Dictinfo> findPage(Page<Dictinfo> page, Dictinfo dictinfo) {
		return super.findPage(page, dictinfo);
	}
	
	@Transactional(readOnly = false)
	public void save(Dictinfo dictinfo) {
		super.save(dictinfo);
	}
	
	@Transactional(readOnly = false)
	public void delete(Dictinfo dictinfo) {
		super.delete(dictinfo);
	}
	
	@Transactional(readOnly = false)
	public void delete(String ids) {
		if(!StringUtils.isEmpty(ids)){
			String [] idArray = ids.split(",");
			for (String id : idArray) {
				Dictinfo dictinfo = super.get(id);
				super.delete(dictinfo);
			}
		}
	} 
	
}